//
//  ViewController.m
//  MoveBtn
//
//  Created by limaohuyu on 2020/9/24.
//

#import "ViewController.h"
#import "MoveMenuView.h"




@interface ViewController ()



@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    
    MoveMenuAction *action1 = [MoveMenuAction actionWithTitle:@"1" image: nil handler:^{
        NSLog(@"===1111=");

    }];
    
    MoveMenuAction *action2 = [MoveMenuAction actionWithTitle:@"2" image: nil handler:^{
        NSLog(@"===2222=");

    }];
    MoveMenuAction *action3 = [MoveMenuAction actionWithTitle:@"3" image:nil handler:^{
        
        NSLog(@"===d3333=");
        
    }];
    
    MoveMenuAction *action4 = [MoveMenuAction actionWithItemHandler:^UIButton * _Nonnull{
        
        UIButton * itemBtn =[UIButton buttonWithType:UIButtonTypeCustom];
        [itemBtn setTitle:@"4" forState:UIControlStateNormal];
    
        itemBtn.backgroundColor = [UIColor yellowColor];
        itemBtn.frame = CGRectMake(0,0,80,80);
        return  itemBtn;
    }];
    
    action4.handler = ^{
        NSLog(@"===ddddddd=");

    };
    MoveMenuView *moveMenuView = [MoveMenuView showSupView:self.view locationInSupView:CGPointMake(20, 50) actions:@[action1,action2,action3,action4]];
    moveMenuView.menuBgImage  =[UIImage imageNamed:@"ghg22"];
}






@end
